//
//  InsuranceHeadCell.m
//  carcareIOS
//
//  Created by 王然 on 16/7/25.
//  Copyright © 2016年 chezheng. All rights reserved.
//

#import "InsuranceHeadCell.h"
#import "InsuHeadSmallV.h"

@interface InsuranceHeadCell()

@property (nonatomic , strong) InsuHeadSmallV * smallCellV;



@property (nonatomic , strong) InsuHeadBigV * bigCellV;


@end

@implementation InsuranceHeadCell
- (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSmallView];
        [self createBigView];
    }
    return self;
}
- (void)createSmallView
{
    self.smallCellV = [[InsuHeadSmallV viewWithFrame:CGRectMake(0, 0, __MAIN_WIDTH, CELL_HEAD_SMALL_HEIGHT)] setupOnView:self];
    [self.smallCellV setHidden:YES];
}
- (void)createBigView
{
    self.bigCellV = [[InsuHeadBigV viewWithFrame:CGRectMake(0, 0, __MAIN_WIDTH, CELL_HEAD_BIG_HEIGHT)] setupOnView:self];
    
    [self.bigCellV setHidden:YES];
}
- (void)reloadSmallVIconImage:(UIImage *)image title:(NSString *)title questionBtnClick:(void(^)())questionBtnCilck
{
    [self.bigCellV setHidden:YES];
    [self.smallCellV setHidden:NO];
    
    [self.smallCellV reloadIconImage:image title:title questionBtnClick:questionBtnCilck];
    
}
- (void)reloadBigWithModel:(PolicyModel *)model bottomCellClick:(void(^)())bottomCellClick
{
    [self.smallCellV setHidden:YES];
    [self.bigCellV setHidden:NO];
    
    [self.bigCellV reloadWithModel:model bottomCellClick:bottomCellClick];
    
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
